var list = [
    {
        name: "基础管理",
        fold: false,
        all: false,
        list: [
            { name: "校园汇总", key: "summary", top: 127 },
            // {name: '模块管理', key: 'module', top: 5},
            { name: "账号管理", key: "account" },
            { name: "食谱管理", key: "cookbook" },
            { name: "幻灯片管理", key: "slide" },
            { name: "监控管理", key: "live", top: 175 },
        ],
    },
    {
        name: "教务管理",
        fold: false,
        all: false,
        list: [
            { name: "员工管理", key: "teacher" },
            { name: "年级管理", key: "grade" },
            { name: "班级管理", key: "classes" },
            { name: "学生管理", key: "student" },
            { name: "课程管理", key: "course" },
            { name: "每周课表", key: "timetable" },
            { name: "成绩管理", key: "score" },
        ],
    },
    {
        name: "校务管理",
        fold: false,
        all: false,
        list: [
            { name: "学校简介", key: "intro" },
            { name: "学校新闻", key: "news" },
            { name: "学校招生", key: "enroll" },
            { name: "学校通知", key: "notice" },
            { name: "在线报名", key: "signup" },
        ],
    },
    {
        name: "考勤管理",
        fold: false,
        all: false,
        list: [
            { name: "考勤记录", key: "attendance", top: 111 },
            { name: "考勤卡库", key: "card", top: 47 },
            { name: "补签记录", key: "punch", top: 111 },
            { name: "访客记录", key: "guest", top: 111 },
            { name: "人脸日志", key: "faceLog", top: 127 },
        ],
    },
    {
        name: "设备管理",
        fold: false,
        all: false,
        list: [
            { name: "考勤机", key: "device" },
            { name: "访客机", key: "guestDevice" },
            { name: "分班播报机", key: "board" },
        ],
    },
    {
        name: "财务管理",
        fold: false,
        all: false,
        list: [
            { name: "缴费管理", key: "charge" },
            { name: "订单管理", key: "order" },
            { name: "打印机", key: "printer" },
        ],
    },
    {
        name: "其他",
        fold: false,
        all: false,
        list: [
            { name: "打卡消课", key: "lesson", top: 127 },
            { name: "可视化放学", key: "leaveSchool", top: 127 },
            { name: "校车", key: "bus", top: 127 },
        ],
    },
];
//top表示开启的权限
//top:4=>[false, false, true, false]
//top:5=>[true, false, true, false]
//top:6=>[false, true, true, false]
//top:7=>[false, true, true, true]

list.forEach(function (it) {
    it.list.forEach(function (it1) {
        it1.allows = [false, false, false, false,false, false, false, false];
    });
});

function and(a, b) {
    var c = [0, 0, 0, 0,0,0,0,0];
    for (var i = 0; i < 8; i++) c[i] = a[i] && b[i];
    return c;
}
